| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

QuaternionWrapper.h
1 // QuaternionWrapper.h
3 //
5
6 namespace nkAstraeus::nkMathsWrap
7 {
11 class QuaternionWrapper final
12 {
13 public :
14
15 // Environment update
21 static void updateEnvironment (nkScripts::Environment* env) ;
22
23 // Callbacks
24 // Construction / destruction
35 static void* constructor (const nkScripts::DataStack& stack) ;
41 static void destructor (void* toDestroy) ;
52 static nkScripts::OutputValue newQuat4 (const nkScripts::DataStack& stack) ;
53 // Getters
64 static nkScripts::OutputValue getX (void* vector) ;
75 static nkScripts::OutputValue getY (void* vector) ;
86 static nkScripts::OutputValue getZ (void* vector) ;
97 static nkScripts::OutputValue getW (void* vector) ;
108 static nkScripts::OutputValue getAsEulerAngles (const nkScripts::DataStack& stack) ;
109
110 // Setters
121 static void setX (const nkScripts::DataStack& stack) ;
132 static void setY (const nkScripts::DataStack& stack) ;
143 static void setZ (const nkScripts::DataStack& stack) ;
154 static void setW (const nkScripts::DataStack& stack) ;
155 // Applications
166 static nkScripts::OutputValue transform (const nkScripts::DataStack& stack) ;
177 static nkScripts::OutputValue apply (const nkScripts::DataStack& stack) ;
178 // Conversion
189 static nkScripts::OutputValue setFromAxisAngle (const nkScripts::DataStack& stack) ;
200 static nkScripts::OutputValue setFromEuler (const nkScripts::DataStack& stack) ;
211 static nkScripts::OutputValue setFromRotationBetween (const nkScripts::DataStack& stack) ;
222 static nkScripts::OutputValue setFromOrientationMatrix (const nkScripts::DataStack& stack) ;
233 static nkScripts::OutputValue setFromTransformationMatrix (const nkScripts::DataStack& stack) ;
244 static nkScripts::OutputValue toString (const nkScripts::DataStack& stack) ;
245 // Operators
256 static nkScripts::OutputValue add (const nkScripts::DataStack& stack) ;
267 static nkScripts::OutputValue sub (const nkScripts::DataStack& stack) ;
278 static nkScripts::OutputValue mul (const nkScripts::DataStack& stack) ;
289 static nkScripts::OutputValue div (const nkScripts::DataStack& stack) ;
290 // Logical
301 static nkScripts::OutputValue eq (const nkScripts::DataStack& stack) ;
302 } ;
303 }
nkAstraeus::nkMathsWrap::QuaternionWrapper::setX
static void setX(const nkScripts::DataStack &stack)
nkAstraeus::nkMathsWrap
Encompasses the wrapping of nkMaths for scripting.
Definition: MatrixWrapper.h:7
nkAstraeus::nkMathsWrap::QuaternionWrapper::add
static nkScripts::OutputValue add(const nkScripts::DataStack &stack)
nkAstraeus::nkMathsWrap::QuaternionWrapper::setFromRotationBetween
static nkScripts::OutputValue setFromRotationBetween(const nkScripts::DataStack &stack)
nkScripts::Environment
Defines an environment in which scripts can execute.
Definition: Environment.h:14
nkAstraeus::nkMathsWrap::QuaternionWrapper::setFromEuler
static nkScripts::OutputValue setFromEuler(const nkScripts::DataStack &stack)
nkAstraeus::nkMathsWrap::QuaternionWrapper::setY
static void setY(const nkScripts::DataStack &stack)
nkMemory::BufferView
A view over data.
Definition: BufferView.h:18
nkAstraeus::nkMathsWrap::QuaternionWrapper::destructor
static void destructor(void *toDestroy)
nkAstraeus::nkMathsWrap::QuaternionWrapper::getW
static nkScripts::OutputValue getW(void *vector)
nkAstraeus::nkMathsWrap::QuaternionWrapper::apply
static nkScripts::OutputValue apply(const nkScripts::DataStack &stack)
nkAstraeus::nkMathsWrap::QuaternionWrapper
Wraps a nkMaths::Quaternion and offers functions for use in scripting.
Definition: QuaternionWrapper.h:12
nkAstraeus::nkMathsWrap::QuaternionWrapper::setFromTransformationMatrix
static nkScripts::OutputValue setFromTransformationMatrix(const nkScripts::DataStack &stack)
nkAstraeus::nkMathsWrap::QuaternionWrapper::setW
static void setW(const nkScripts::DataStack &stack)
nkAstraeus::nkMathsWrap::QuaternionWrapper::eq
static nkScripts::OutputValue eq(const nkScripts::DataStack &stack)
nkAstraeus::nkMathsWrap::QuaternionWrapper::div
static nkScripts::OutputValue div(const nkScripts::DataStack &stack)
nkScripts::FunctionParameter
A function parameter, used within the stack of arguments.
Definition: FunctionParameter.h:25
nkAstraeus::nkMathsWrap::QuaternionWrapper::toString
static nkScripts::OutputValue toString(const nkScripts::DataStack &stack)
nkAstraeus::nkMathsWrap::QuaternionWrapper::getX
static nkScripts::OutputValue getX(void *vector)
nkAstraeus::nkMathsWrap::QuaternionWrapper::constructor
static void * constructor(const nkScripts::DataStack &stack)
nkAstraeus::nkMathsWrap::QuaternionWrapper::setZ
static void setZ(const nkScripts::DataStack &stack)
nkAstraeus::nkMathsWrap::QuaternionWrapper::setFromAxisAngle
static nkScripts::OutputValue setFromAxisAngle(const nkScripts::DataStack &stack)
nkAstraeus::nkMathsWrap::QuaternionWrapper::mul
static nkScripts::OutputValue mul(const nkScripts::DataStack &stack)
nkAstraeus::nkMathsWrap::QuaternionWrapper::updateEnvironment
static void updateEnvironment(nkScripts::Environment *env)
nkAstraeus::nkMathsWrap::QuaternionWrapper::getAsEulerAngles
static nkScripts::OutputValue getAsEulerAngles(const nkScripts::DataStack &stack)
nkAstraeus::nkMathsWrap::QuaternionWrapper::newQuat4
static nkScripts::OutputValue newQuat4(const nkScripts::DataStack &stack)
nkAstraeus::nkMathsWrap::QuaternionWrapper::transform
static nkScripts::OutputValue transform(const nkScripts::DataStack &stack)
nkAstraeus::nkMathsWrap::QuaternionWrapper::getY
static nkScripts::OutputValue getY(void *vector)
nkAstraeus::nkMathsWrap::QuaternionWrapper::getZ
static nkScripts::OutputValue getZ(void *vector)
nkAstraeus::nkMathsWrap::QuaternionWrapper::sub
static nkScripts::OutputValue sub(const nkScripts::DataStack &stack)
nkAstraeus::nkMathsWrap::QuaternionWrapper::setFromOrientationMatrix
static nkScripts::OutputValue setFromOrientationMatrix(const nkScripts::DataStack &stack)